home *** CD-ROM | disk | FTP | other *** search
/ Exame Informatica 139 / Exame Informatica 139.iso / Internet / NVU / chrome / toolkit.jar / content / mozapps / extensions / extensions.xul < prev    next >
Encoding:
Extensible Markup Language  |  2005-01-31  |  12.6 KB  |  255 lines

  1. <?xml version="1.0"?>
  2.  
  3.  
  4. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 
  5. <?xml-stylesheet href="chrome://mozapps/content/extensions/extensions.css"?>
  6. <?xml-stylesheet href="chrome://mozapps/skin/extensions/extensions.css"?>
  7.  
  8. <!DOCTYPE window [
  9. <!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd">
  10. %brandDTD;
  11. <!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd">
  12. %extensionsDTD;
  13. ]>
  14.  
  15. <window xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  16.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  17.         id="extensionsManager" windowtype="Extension:Manager"
  18.         orient="vertical" title="&extensions.title;" statictitle="&extensions.title;"
  19.         screenX="10" screenY="10"
  20.         persist="width height screenX screenY sizeMode"
  21.         onload="Startup();" onunload="Shutdown();"
  22.         onclose="return closeWindow(false);">
  23.       
  24.   <script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
  25.   <script type="application/x-javascript" src="chrome://mozapps/content/extensions/extensions.js"/>
  26.   <script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
  27.   <script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
  28.   
  29.   <stringbundleset id="extensionsSet">
  30.     <stringbundle id="brandStrings" src="chrome://global/locale/brand.properties"/>
  31.     <stringbundle id="extensionsStrings" src="chrome://mozapps/locale/extensions/extensions.properties"/>
  32.     <stringbundle id="xpinstallStrings" src="chrome://global/locale/xpinstall/xpinstall.properties"/>
  33.   </stringbundleset>
  34.     
  35.   <keyset id="extensionsKeys">
  36.     <key id="key_close"   key="&cmd.close.commandKey;"    modifiers="accel" command="cmd_close" 
  37.          oncommand="gExtensionsViewController.doCommand('cmd_close');"/>
  38.     <key id="key_close2"  keycode="VK_ESCAPE"                               command="cmd_close"
  39.          oncommand="gExtensionsViewController.doCommand('cmd_close');"/>
  40.     <key id="key_about"   key="&cmd.info.commandKey;"     modifiers="accel" command="cmd_about" 
  41.          oncommand="gExtensionsViewController.doCommand('cmd_about');"/>
  42.     <key id="key_options" key="&cmd.options.commandKey;"  modifiers="accel" command="cmd_options"
  43.          oncommand="gExtensionsViewController.doCommand('cmd_options');"/>
  44.   </keyset>
  45.   
  46.   <commandset id="extensionsCommands"
  47.               events="richview-select,focus"
  48.               commandupdater="true"
  49.               oncommandupdate="gExtensionsViewController.onCommandUpdate();"
  50.               oncommand="gExtensionsViewController.doCommand(event.target.id);">
  51.     <command id="cmd_close"/>
  52.     <command id="cmd_options"/>
  53.     <command id="cmd_about"/>
  54.     <command id="cmd_homepage"/>
  55.     <command id="cmd_install"/>
  56.     <command id="cmd_uninstall"/>
  57.     <command id="cmd_update"/>
  58.     <command id="cmd_enable"/>
  59.     <command id="cmd_disable"/>
  60.     <command id="cmd_movetop"/>
  61.     <command id="cmd_moveup"/>
  62.     <command id="cmd_movedn"/>
  63.     <command id="cmd_useTheme"/>
  64.   </commandset>
  65.   
  66.   <vbox id="contextMenuPalette" hidden="true">
  67.     <menuitem id="menuitem_useTheme" default="true" command="cmd_useTheme"
  68.               label="&cmd.useTheme.label;" accesskey="&cmd.useTheme.accesskey;"/>
  69.     <menuitem id="menuitem_options" default="true" command="cmd_options"
  70.               label="&cmd.options.label;" accesskey="&cmd.options.accesskey;"/>
  71.     <menuitem id="menuitem_homepage" command="cmd_homepage"
  72.               label="&cmd.homepage.label;" accesskey="&cmd.homepage.accesskey;"/>
  73.     <menuitem id="menuitem_about" command="cmd_about"
  74.               label="&cmd.about.label;" accesskey="&cmd.about.accesskey;"/>
  75.     <menuseparator id="menuseparator_1"/>
  76.     <menuitem id="menuitem_uninstall" command="cmd_uninstall"
  77.               label="&cmd.uninstall.label;" accesskey="&cmd.uninstall.accesskey;"/>
  78.     <menuitem id="menuitem_update" command="cmd_update"
  79.               label="&cmd.update.label;" accesskey="&cmd.update.accesskey;"/>
  80.     <menuitem id="menuitem_enable" command="cmd_enable"
  81.               label="&cmd.enable.label;" accesskey="&cmd.enable.accesskey;"/>
  82.     <menuitem id="menuitem_disable" command="cmd_disable"
  83.               label="&cmd.disable.label;" accesskey="&cmd.disable.accesskey;"/>
  84.     <menuseparator id="menuseparator_2"/>
  85.     <menuitem id="menuitem_moveTop" command="cmd_movetop"
  86.               label="&cmd.moveToTop.label;" accesskey="&cmd.moveToTop.accesskey;"/>
  87.     <menuitem id="menuitem_moveUp" command="cmd_moveup"
  88.               label="&cmd.moveUp.label;" accesskey="&cmd.moveUp.accesskey;"/>
  89.     <menuitem id="menuitem_moveDn" command="cmd_movedn"
  90.               label="&cmd.moveDn.label;" accesskey="&cmd.moveDn.accesskey;"/>
  91.   </vbox>
  92.   
  93.   <popup id="extensionContextMenu" onpopupshowing="return buildContextMenu(event);"/>
  94.  
  95.   <hbox flex="1">
  96.     <view id="extensionsView" flex="3" style="overflow: auto;"
  97.           context="extensionContextMenu"
  98.           datasources="rdf:null" persist="last-selected"
  99.           ondragover="nsDragAndDrop.dragOver(event, gExtensionsDNDObserver);"
  100.           ondragdrop="nsDragAndDrop.drop(event, gExtensionsDNDObserver);"
  101.           ondblclick="onViewDoubleClick(event);">
  102.       <template>
  103.         <rule>
  104.           <conditions>
  105.             <content uri="?uri"/>
  106.             <member container="?uri" child="?extension"/>
  107.             <triple subject="?extension"
  108.                     predicate="http://www.mozilla.org/2004/em-rdf#name"
  109.                     object="?name"/>
  110.             <triple subject="?extension"
  111.                     predicate="http://www.mozilla.org/2004/em-rdf#version"
  112.                     object="?version"/>
  113.           </conditions>
  114.           <bindings>
  115.             <binding subject="?extension"
  116.                     predicate="http://www.mozilla.org/2004/em-rdf#creator"
  117.                     object="?creator"/>
  118.             <binding subject="?extension"
  119.                     predicate="http://www.mozilla.org/2004/em-rdf#iconURL"
  120.                     object="?icon"/>
  121.             <binding subject="?extension"
  122.                     predicate="http://www.mozilla.org/2004/em-rdf#previewImage"
  123.                     object="?previewImage"/>
  124.             <binding subject="?extension"
  125.                     predicate="http://www.mozilla.org/2004/em-rdf#optionsURL"
  126.                     object="?options-url"/>
  127.             <binding subject="?extension"
  128.                     predicate="http://www.mozilla.org/2004/em-rdf#aboutURL"
  129.                     object="?about-url"/>
  130.             <binding subject="?extension"
  131.                     predicate="http://www.mozilla.org/2004/em-rdf#updateURL"
  132.                     object="?update-url"/>
  133.             <binding subject="?extension"
  134.                     predicate="http://www.mozilla.org/2004/em-rdf#disabled"
  135.                     object="?disabled"/>
  136.             <binding subject="?extension"
  137.                     predicate="http://www.mozilla.org/2004/em-rdf#compatible"
  138.                     object="?compatible"/>
  139.             <binding subject="?extension"
  140.                     predicate="http://www.mozilla.org/2004/em-rdf#homepageURL"
  141.                     object="?homepage-url"/>
  142.             <binding subject="?extension"
  143.                     predicate="http://www.mozilla.org/2004/em-rdf#description"
  144.                     object="?description"/>
  145.             <binding subject="?extension"
  146.                     predicate="http://www.mozilla.org/2004/em-rdf#displayDescription"
  147.                     object="?displayDescription"/>
  148.             <binding subject="?extension"
  149.                     predicate="http://www.mozilla.org/2004/em-rdf#locked"
  150.                     object="?locked"/>
  151.             <binding subject="?extension"
  152.                     predicate="http://www.mozilla.org/2004/em-rdf#toBeInstalled"
  153.                     object="?toBeInstalled"/>
  154.             <binding subject="?extension"
  155.                     predicate="http://www.mozilla.org/2004/em-rdf#toBeUninstalled"
  156.                     object="?toBeUninstalled"/>
  157.             <binding subject="?extension"
  158.                     predicate="http://www.mozilla.org/2004/em-rdf#toBeEnabled"
  159.                     object="?toBeEnabled"/>
  160.             <binding subject="?extension"
  161.                     predicate="http://www.mozilla.org/2004/em-rdf#toBeDisabled"
  162.                     object="?toBeDisabled"/>
  163.             <binding subject="?extension"
  164.                     predicate="http://www.mozilla.org/2004/em-rdf#itemType"
  165.                     object="?itemType"/>
  166.             <binding subject="?extension"
  167.                     predicate="http://www.mozilla.org/2004/em-rdf#internalName"
  168.                     object="?internalName"/>
  169.             <binding subject="?extension"
  170.                     predicate="http://www.mozilla.org/2004/em-rdf#downloadURL"
  171.                     object="?downloadURL"/>
  172.             <binding subject="?extension"
  173.                     predicate="http://www.mozilla.org/2004/em-rdf#state"
  174.                     object="?state"/>
  175.             <binding subject="?extension"
  176.                     predicate="http://www.mozilla.org/2004/em-rdf#progress"
  177.                     object="?progress"/>
  178.             <binding subject="?extension"
  179.                     predicate="http://www.mozilla.org/2004/em-rdf#status"
  180.                     object="?status"/>
  181.           </bindings>            
  182.           <action>
  183.             <!-- XXXben - we could really use a variety of different templates
  184.                           here to make each element not be so heavy. -->
  185.             <extension uri="?extension"
  186.                        image="?icon" name="?name" version="?version" 
  187.                        description="?displayDescription" creator="?creator"
  188.                        disabled="?disabled" locked="?locked" 
  189.                        compatible="?compatible"
  190.                        optionsURL="?options-url" homepageURL="?homepage-url"
  191.                        aboutURL="?about-url" updateURL="?update-url"
  192.                        previewImage="?previewImage" internalName="?internalName"
  193.                        toBeInstalled="?toBeInstalled" toBeUninstalled="?toBeUninstalled"
  194.                        toBeEnabled="?toBeEnabled" toBeDisabled="?toBeDisabled"
  195.                        itemType="?itemType" downloadURL="?downloadURL"
  196.                        state="?state" progress="?progress" status="?status"/>
  197.           </action>
  198.         </rule>
  199.       </template>
  200.     </view> 
  201.     <vbox flex="5" id="themePreviewArea" class="themePreviewArea" hidden="true">
  202.       <deck id="previewImageDeck" flex="1">
  203.         <vbox id="noThemeSelected" pack="center" align="center">
  204.           <label class="previewText">&previewNoThemeSelected.label;</label>
  205.         </vbox>
  206.         <vbox id="noPreviewImage" pack="center" align="center">
  207.           <label class="previewText">&previewNoPreviewImage.label;</label>
  208.         </vbox>
  209.         <vbox id="previewImageContainer" align="center" pack="center"
  210.               style="overflow: auto;">
  211.           <description>
  212.             <image id="previewImage"/>
  213.           </description>
  214.         </vbox>
  215.       </deck>
  216.     </vbox>
  217.   </hbox>
  218.   <hbox>
  219.     <hbox id="commandBar" flex="1" align="center">
  220.       <hbox>
  221.         <button id="installButton"
  222.                 label="&cmd.install.label;" accesskey="&cmd.install.accesskey;" tooltiptext="&cmd.install.tooltip;" 
  223.                 command="cmd_install"/>
  224.         <button id="uninstallButton" 
  225.                 label="&cmd.uninstall.label;" accesskey="&cmd.uninstall.accesskey;" tooltiptext="&cmd.uninstall.tooltip;" 
  226.                 command="cmd_uninstall"/>
  227.         <separator class="commandBarSeparator"/>              
  228.         <button id="updateButton" 
  229.                 label="&cmd.update.label;" accesskey="&cmd.update.accesskey;" tooltiptext="&cmd.update.tooltip;"
  230.                 command="cmd_update"/>
  231.         <separator class="commandBarSeparator"/>              
  232.         <button id="optionsButton"
  233.                 label="&cmd.options.label;" accesskey="&cmd.options.accesskey;" tooltiptext="&cmd.options.tooltip;"
  234.                 command="cmd_options"/>
  235.         <button id="useThemeButton" hidden="true"
  236.                 label="&cmd.useTheme.label;" accesskey="&cmd.useTheme.accesskey;" tooltiptext="&cmd.useTheme.tooltip;"
  237.                 command="cmd_useTheme"/>
  238.       </hbox>
  239.       <spacer flex="1"/>
  240.  
  241.       <label id="getMore"
  242.              onclick="openURL(gGetMoreURL);"
  243.              onkeypress="if (event.keyCode == event.DOM_VK_ENTER || event.keyCode == event.DOM_VK_RETURN) openURL(gGetMoreURL);"
  244.              valuethemes="&getMoreThemes.label;"
  245.              valueextensions="&getMoreExtensions.label;"
  246.              tooltiptextthemes="&getMoreThemes.tooltip;"
  247.              tooltiptextextensions="&getMoreExtensions.tooltip;"/>
  248.     </hbox>
  249.     
  250.     <resizer id="windowResizer" dir="bottomright"/>
  251.   </hbox>  
  252.  
  253. </window>
  254.  
  255.